home *** CD-ROM | disk | FTP | other *** search
- property pLoop, pTimeToExit
- global gPermanentGlobals, gFlashSprite, gFlashvariables, gPlayersTotalMilliseconds, gVehicles
-
- on beginSprite me
- pLoop = 1
- pTimeToExit = VOID
- gFlashSprite.addlistener(me)
- end
-
- on action me, actiontype
- case actiontype of
- "cancelSubmit":
- go("restart")
- "submitScore":
- submitData = [:]
- submitData["firstname"] = gFlashSprite.pSprite.getVariable("firstName")
- submitData["lastname"] = gFlashSprite.pSprite.getVariable("lastName")
- submitData["email"] = gFlashSprite.pSprite.getVariable("email")
- submitData["location"] = gFlashSprite.pSprite.getVariable("country")
- submitData["time"] = string(gPlayersTotalMilliseconds)
- submitData["position"] = string(gFlashvariables["userPlace"])
- nfo = gFlashSprite.pSprite.getVariable("info")
- if nfo = EMPTY then
- nfo = 0
- end if
- submitData["info"] = nfo
- submitData["race"] = string(gPermanentGlobals.race)
- submitData["language"] = string(gPermanentGlobals.userLanguage)
- put submitData
- tURL = "http://www.codemasters.com/tocaracedriver/etoy/tocascores.php"
- sendencryptedData(tURL, submitData)
- pTimeToExit = the milliSeconds + 3000
- "submitAnimOver":
- "tryagainSubmit":
- end case
- end
-
- on exitFrame me
- if integerp(pTimeToExit) then
- if the milliSeconds > pTimeToExit then
- go("restart")
- end if
- end if
- go(the frame)
- end
-
- on getPropertyDescriptionList me
- eventList = ["carAnimOver", "submitAnimOver", "carChosen"]
- l = [:]
- l[#pWaitEvent] = [#comment: "Which label?", #format: #string, #range: eventList, #default: eventList[1]]
- return l
- end
-